package com.deyuanyun.pic.pbf.app.enumeration;

/**
 * @Description 流程表单对应枚举
 * @author Jerry
 * @date 2016-06-29
 */
public enum FormCode {
    TRENCH_EXCAVATION("1E3290704BF1749EE0530E0AA8C00010","管沟开挖"),
    CORROSION_ENVIRONMENT("1E3290704BF1749EE0530E0AA8C00020","腐蚀环境调查"),
    COAT_SURVEY("1E3290704BF1749EE0530E0AA8C00030","防腐层调查"),
    SURFACE_TREATMENT("1E3290704BF1749EE0530E0AA8C00040","表面处理"),
    CP_SURVEY("1E3290704BF1749EE0530E0AA8C00050","阴保调查"),
    CTRL_EXINSP("1E3290704BF1749EE0530E0AA8C00100","漏损点测量"),
    DEFECT_MEASURE("1E3290704BF1749EE0530E0AA8C00060","缺陷测量"),
    REPAIR_COMPOSITES("1E3290704BF1749EE0530E0AA8C00071","复合材料补强修复"),
    REPAIR_EPOXY_SLEEVE("1E3290704BF1749EE0530E0AA8C00072","钢质环氧套筒补强修复"),
    REPAIR_ATYPE_SLEEVE("1E3290704BF1749EE0530E0AA8C00073","A型套筒补强修复"),
    REPAIR_BTYPE_SLEEVE("1E3290704BF1749EE0530E0AA8C00074","B型套筒补强修复"),
    REPAIR_REPLACE_PIPE("1E3290704BF1749EE0530E0AA8C00075","换管"),
    //补强修复
    COAT_REPAIR("1E3290704BF1749EE0530E0AA8C00080","防腐层修复"),
    TRENCH_BACKFILL("1E3290704BF1749EE0530E0AA8C00090","管沟回填"),
    REPAIR_OTHER("1E3290704BF1749EE0530E0AA8C00077","其他修复方法"),
    WELD_REPAIR("1E3290704BF1749EE0530E0AA8D00075","焊接");


    private   String code;
    private   String lable;

    FormCode(String code, String lable) {
        this.code = code;
        this.lable = lable;
    }


    public static FormCode getVal(String code) {

        FormCode rs[] = FormCode.values();
        for (int i = 0, end = rs.length; i < end; i++) {
            if (rs[i].getCode().equals(code)) {
                return rs[i];
            }
        }
        return null;
    }

    public static String getLabelBycode(String code) {
        FormCode rs[] = FormCode.values();
        for (int i = 0; i < rs.length; i++) {
            if (rs[i].toString().equals(code)) {
                return rs[i].getLable();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getLable() {
        return lable;
    }

    public void setLable(String lable) {
        this.lable = lable;
    }
}
